<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
#macro ( genericTree $somelist ) 
#foreach ( $some in $somelist )
<option value="$!some.id">#if($!some.level>0)
#foreach($count in [0..$!some.level])&nbsp;#end #end $!some.className</option>
#genericTree($some.childs) 
#end 
#end
<link href="$!webPath/resources/style/system/manage/$!{config.websiteCss}/template.css"  rel="stylesheet" type="text/css"/>
<script src="$!webPath/resources/js/jquery-1.6.2.js"></script>
<script src="$!webPath/resources/js/jquery.poshytip.min.js"></script>
<script src="$!webPath/resources/js/jquery.shop.common.js"></script>
<script src="$!webPath/resources/js/jquery.validate.min.js"></script>
<script>
jQuery(document).ready(function(){
  jQuery("#theForm").validate({
    rules:{
	  userName:{
	    required :true,
	     remote:{
		    url: "$!webPath/verify_username.htm",     //后台处理程序
            type: "post",               //数据发送方式
            dataType: "json",           //接受数据格式   
            data: {                     //要传递的数据
                  "userName": function(){return jQuery("#userName").val();},
				  "id":function(){return jQuery("#id").val()}
		     }
			}
	  },
	  email:{
	    required :true,
		email:true,
		remote:{
		    url: "$!webPath/verify_email.htm",     //后台处理程序
            type: "post",               //数据发送方式
            dataType: "json",           //接受数据格式   
            data: {                     //要传递的数据
                  "mail": function(){return jQuery("#userName").val();},
				  "id":function(){return jQuery("#id").val()}
		     }
			}
	  }#if(!$!edit),
	  password:{
	    required:true,
		minlength:6,
		maxlength:20
	  }
	  #end
	 },
	messages:{
	  userName:{required:"用户名不能为空",remote:"该用户名已经存在"},
	  email:{required:"电子邮箱不能为空",email:"邮箱格式不对",remote:"该邮箱已被使用"}#if(!$!edit),
	  password:{required:"密码不能为空",minlength:"密码不能少于{0}位",maxlength:"密码不能大于{0}位"}#end
	}
  });	
  jQuery(":radio[id=sex]").each(function(){
    if(jQuery(this).val()=="$!obj.sex")jQuery(this).attr("checked",true);
  });
  jQuery(":radio[id=report][value=$!obj.report]").attr("checked",true);
});

function saveForm(){
   jQuery("#theForm").submit();
}
</script>
</head>
<body>
<div class="cont">
  <h1 class="seth1">金币管理</h1>
  <div class="settab"> <span class="tab-one"></span> <span class="tabs"> <a href="$!webPath/admin/gold_record.htm">购买记录</a> | <a href="$!webPath/admin/gold_log.htm">购买日志</a>|<a href="javascript:void(0);" class="this">编辑</a> </span> <span class="tab-two"></span> </div>
  <form name="theForm" id="theForm" action="$!webPath/admin/gold_record_save.htm" method="post">
    <input name="id" type="hidden" id="id" value="$!obj.id" />
    <input name="currentPage" type="hidden" id="currentPage" value="$!currentPage" />
    <input name="list_url" type="hidden" id="list_url" value="$!webPath/admin/gold_record.htm" />
    <div class="setcont">
    <ul class="set1">
        <li>编号</li>
        <li><span class="webname"> $!obj.gold_sn</span></li>
      </ul>
      <ul class="set1">
        <li>会员名</li>
        <li><span class="webname"> $!obj.gold_user.userName </span></li>
      </ul>
      <ul class="set1">
        <li>现有金币数</li>
        <li><span class="webname"> $!obj.gold_user.gold</span></li>
      </ul>
      <ul class="set1">
        <li>付款金额</li>
        <li><span class="webname"> $!obj.gold_money </span></li>
      </ul>
      <ul class="set1">
        <li>兑换金币数</li>
        <li><span class="webname"> $!obj.gold_count</span></li>
      </ul>
      <ul class="set1">
        <li>收款状态 </li>
        <li><span class="webname">
          <input name="gold_pay_status"  type="radio" id="gold_pay_status" style="border:none; height:16px; width:16px;" value="2" checked="checked" />
          收款完成
          <input style="border:none; height:16px; width:16px;" type="radio" id="gold_pay_status" name="gold_pay_status" value="1" />
          等待审核
          <input style="border:none; height:16px; width:16px;" type="radio" id="gold_pay_status" name="gold_pay_status" value="0" />
          等待支付 </span><span id="nothis"><strong class="q"></strong><strong class="w">管理员只能操作一次金币记录</strong><strong class="c"></strong></span> </li>
      </ul>
      <ul class="set1">
        <li>操作说明</li>
        <li><span class="webname">
          <textarea name="gold_admin_info" id="gold_admin_info" cols="45" rows="5"></textarea>
          </span></li>
      </ul>
    </div>
  </form>
  <div class="submit">
    <input name="save" type="button" value="提交" onclick="saveForm()" />
  </div>
</div>
</body>
</html>